﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using KandieWebProjectI.BLL.Controller;
using KandieWebProjectI.Domain.Model;

namespace KandieWebProjectI.UI.Forms.ClientePages
{
    public partial class ClientesPage : System.Web.UI.Page
    {
        private Cliente _cliente;
        private IList<Cliente> _listClientes;
        private ClienteBLL _clienteBll;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                BindDataToGridView();
            }
            else 
            { 
                
            }
        }

        private void BindDataToGridView()
        {
            _clienteBll = new ClienteBLL();

            _listClientes = _clienteBll.RetornaTodos();

            gridClientes.DataSource = _listClientes;
            gridClientes.DataBind();
        }

        private void linkDeletar_onRowDeleting(object sender, GridViewDeletedEventArgs e)
        {
            var i = 0;    
        }
    }
}